{"ast":null,"code":"var __read = this && this.__read || function (o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o),\n    r,\n    ar = [],\n    e;\n  try {\n    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  } catch (error) {\n    e = {\n      error: error\n    };\n  } finally {\n    try {\n      if (r && !r.done && (m = i[\"return\"])) m.call(i);\n    } finally {\n      if (e) throw e.error;\n    }\n  }\n  return ar;\n};\nimport { useDeprecated } from \"./utils/utils\";\nimport { observable, runInAction } from \"mobx\";\nimport { useState } from \"react\";\nexport function useAsObservableSource(current) {\n  if (\"production\" !== process.env.NODE_ENV) useDeprecated(\"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\");\n  var _a = __read(useState(function () {\n      return observable(current, {}, {\n        deep: false\n      });\n    }), 1),\n    res = _a[0];\n  runInAction(function () {\n    Object.assign(res, current);\n  });\n  return res;\n}","map":{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,aAAa,QAAQ,eAAe;AAC7C,SAASC,UAAU,EAAEC,WAAW,QAAQ,MAAM;AAC9C,SAASC,QAAQ,QAAQ,OAAO;AAEhC,OAAM,SAAUC,qBAAqB,CAAyBC,OAAgB;EAC1E,IAAI,YAAY,KAAKC,OAAO,CAACC,GAAG,CAACC,QAAQ,EACrCR,aAAa,CACT,4OAA4O,CAC/O;EACC,gBAAQG,QAAQ,CAAC;MAAM,iBAAU,CAACE,OAAO,EAAE,EAAE,EAAE;QAAEI,IAAI,EAAE;MAAK,CAAE,CAAC;IAAxC,CAAwC,CAAC;IAA/DC,GAAG,QAA4D;EACtER,WAAW,CAAC;IACRS,MAAM,CAACC,MAAM,CAACF,GAAG,EAAEL,OAAO,CAAC;EAC/B,CAAC,CAAC;EACF,OAAOK,GAAG;AACd","names":["useDeprecated","observable","runInAction","useState","useAsObservableSource","current","process","env","NODE_ENV","deep","res","Object","assign"],"sources":["/data/messenger.client/node_modules/mobx-react-lite/src/useAsObservableSource.ts"],"sourcesContent":["import { useDeprecated } from \"./utils/utils\"\nimport { observable, runInAction } from \"mobx\"\nimport { useState } from \"react\"\n\nexport function useAsObservableSource<TSource extends object>(current: TSource): TSource {\n    if (\"production\" !== process.env.NODE_ENV)\n        useDeprecated(\n            \"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\"\n        )\n    const [res] = useState(() => observable(current, {}, { deep: false }))\n    runInAction(() => {\n        Object.assign(res, current)\n    })\n    return res\n}\n"]},"metadata":{},"sourceType":"module"}